package test;

public class _volatile测试_ extends Thread {
    volatile public static int count;

    synchronized private static void addCount() {
        for (int i = 0; i < 100; i++) {
            count = i;
        }
        System.out.println("count=" + count);
    }

    @Override
    public void run() {
        addCount();
    }

}
